using System;
using System.Data;
using System.Collections.Generic;
using System.Data.SqlClient;

namespace DataAccess
{
    public class MonHoc : Popular
    {

        public  int id {get; set; }
        public string MaMonHoc { get; set; }
        public string TenMonHoc { get; set; }
        public string TenTiengAnh { get; set; }
        public int SoTinChi { get; set; }
        public string DieuKien { get; set; }
        public string MoTa { get; set; }
        public int OrgID { get; set; }
        Common<MonHoc> cm = new Common<MonHoc>();
        public bool Insert(Popular b)
        {
            return cm.Insert(b as MonHoc, "sp_MonHoc_Insert");
        }
        public bool Update(Popular b)
        {
            return cm.UpDate(b as MonHoc, "sp_MonHoc_Update");
        }
        public bool Delete(object b)
        {
            return cm.Delete(b, "sp_MonHoc_Delete");
        }
        public IDataReader Select_ID(object b)
        {
            return cm.Select_ID(b, "sp_MonHoc_SelectByID");
        }
        public IDataReader Select_Name(object b)
        {
            return cm.Select_Name(b, "sp_MonHoc_SelectByName");
        }
        public IDataReader SelectAll()
        {
            return cm.Select_All("sp_MonHoc_SelectAll");
        }
        public List<MonHoc> SelectAllToList()
        {
            return cm.SelectAll<MonHoc>("sp_MonHoc_SelectAll");
        }
    }
}